<template>
  <div class="registered">
    <div class="container type">
      <div class="choose">
        <div :class="[registerType ? 'type-choose' : 'type-choose-active']" @click="changeType(true)">企业注册</div>
        <div :class="[registerType ? 'type-choose-active' : 'type-choose']" @click="changeType(false)">个人注册</div>
      </div>
      <div>
        <button type="button">您好，欢迎光临！我已经注册，现在就<span class="register" @click="login">登录</span></button>
      </div>
    </div>
    <div class="container registered-content">
      <div class="contents">
        <div v-if="registerType" class="left vita">
          <Company />
        </div>
        <div v-else class="left vita">
          <Personal />
        </div>
        <div class="right">
          <img class="registered-img" src="../../../assets/images/registered-img.png" alt>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import Personal from '@/views/welcome-register/component/Personal'
import Company from '@/views/welcome-register/component/Company'
export default {
  name: 'Register',
  components: {
    Personal,
    Company
  },
  data() {
    return {
      registerType: true
    }
  },
  methods: {
    changeType(type) {
      this.registerType = type
    },
    login() {
      this.$router.push('/login')
    }
  }
}
</script>
<style scoped lang="scss">
.registered {
  padding-top: 88px;
  padding-bottom: 87px;
  background: #f5f5f5;
  .type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 14px 0 30px;
    .choose {
      display: flex;
      justify-content: space-between;
      .type-choose {
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 140px;
        height: 40px;
        background: rgba(255, 255, 255, 1);
        margin-right: 14px;
        border-bottom: 0;
      }
      .type-choose-active {
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 140px;
        height: 40px;
        background: rgba(245, 245, 245, 1);
        border: 1px solid rgba(229, 229, 229, 1);
        border-bottom: 0;
        margin-right: 14px;
      }
    }
    .register{
      color: #0198CD;
      cursor: pointer;
    }
  }
  .registered-content {
    background: #ffffff;
    .contents {
      display: flex;
      justify-content: space-between;
      height: 600px;
      .left {
        // padding-top: 71px;
        margin-left: 90px;
        .icon{
          position: absolute;
          left: 14px;
          font-size: 22px;
          top: 2px;
        }
        .business{
          width: 400px;
          height: 42px;
          background: #FF3B30;
          color: #ffffff;
          text-align: center;
          line-height: 42px;
          cursor: pointer;
          margin-left: 100px;
          border-radius: 3px;
          font-size: 18px;
        }
        .check{
          margin-top: 18px;
          margin-left: 100px;
          font-size: 12px;
          .clause{
            color: #FF3B30;
          }
        }
      }
      .vita{
        margin-top: 170px;
      }
      .right {
        .registered-img{
          padding: 114px 40px 0 0;
        }
      }
    }
  }
  /deep/ .registered-content{
    .el-input{
      width: 400px;
      height: 42px;
      .el-input__inner{
        height: 42px;
        padding-left: 47px;
      }
    }
  }
}
</style>
